const express = require('express');
var dishController = require('../controller/dish.controller');

module.exports = (app)=>{
    var router = express.Router();

    router.route('/findByMerchantId/:mid')
        .get(dishController.findByMerchantId);

    router.route('/findByMerchantIdAndType/:mid/:type')
        .get(dishController.findByMerchantIdAndType);

    router.route('/findByMerchantIdAndName/:mid/:name')
        .get(dishController.findByMerchantIdAndName);

    router.route('/findByAll/:mid/:type/:name')
        .get(dishController.findByAll);

    app.use('/dishes',router);

    return router;
}